package com.daoeping.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;


/**
 * Usr_user entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "usr_friend", catalog = "daoeping")
public class Usr_friend implements java.io.Serializable {

	// Fields

	private Integer id;
	private Usr_user usr_user;
	private Usr_user usr_friend;
	private Integer groupId;
	
	// Constructors

	/** default constructor */
	public Usr_friend() {
	}


	/** full constructor */
	public Usr_friend(Usr_user usr_user , Usr_user usr_friend , Integer groupId) {
		this.usr_user = usr_user;
		this.usr_friend = usr_friend;
		this.groupId = groupId;
		
		
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name = "user_id")
	public Usr_user getUsr_user() {
		return usr_user;
	}


	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}

	@ManyToOne
	@JoinColumn(name = "friend_id")
	public Usr_user getUsr_friend() {
		return usr_friend;
	}

	public void setUsr_friend(Usr_user usr_friend) {
		this.usr_friend = usr_friend;
	}

	@Column(name = "group_id", nullable = false, length = 11)
	public Integer getGroupId() {
		return groupId;
	}

	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}


}